package com.fcscs.cservice.client.common.model.configuration.reservation;

import java.util.Collection;
import java.util.Map;

import com.fcscs.core.domain.IdNameModel;
import com.fcscs.core.domain.Property;
import com.fcscs.core.gwt.common.CoreConstants;
import com.fcscs.core.gwt.common.NonDomainModelData;
import com.fcscs.share.gwt.common.LocaleHelper;
import com.fcscs.share.gwt.common.ShareGWTConstants;

public class PropertyIdNameModelData extends NonDomainModelData<IdNameModel<Property>>{

	public PropertyIdNameModelData(IdNameModel<Property> t) {
		super(t);
		// TODO Auto-generated constructor stub
	}


	@Override
	protected void populateNames(Collection<String> tempNames) {
		tempNames.add(CoreConstants.ID);
		tempNames.add(CoreConstants.FULLTNAME);
		tempNames.add(ShareGWTConstants.LOCALNAME);
	}

	@Override
	protected void populateProps(Map<String, Object> props) {
		props.put(CoreConstants.ID, entity.getId());
		props.put(CoreConstants.FULLTNAME,LocaleHelper.getName(entity.getNameSecLang(), entity.getName()));
		props.put(ShareGWTConstants.LOCALNAME, LocaleHelper.getName(entity.getNameSecLang(), entity.getName()));
	}

	@Override
	protected <X> void setProperty(String property, X value) {
	}


}
